package com.whj.plus.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;

@TableName("User")
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class User {
    /*private Integer id;*/
    @TableId(type = IdType.ID_WORKER)
    private Long id;    //雪花算法
    private String name;
    private Integer age;
    private String email;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    @Version
    private Integer version;

    @TableLogic     //这是对应 yml 配置的 db-config-logic
    private Integer status;
}
